<!DOCTYPE html>
<html>
<style>
.flexbox {
    width: 200px;
    display: -webkit-flex;
    background-color: #aaa;
    position: relative;
    -webkit-flex-wrap: wrap-reverse;
    -webkit-align-items: baseline;
    margin-bottom: 10px;
}
.flexbox > div {
    border: 0;
}

.flexbox :nth-child(1) {
    background-color: lightblue;
}
.flexbox :nth-child(2) {
    background-color: lightgreen;
}
.flexbox :nth-child(3) {
    background-color: pink;
}
.flexbox :nth-child(4) {
    background-color: yellow;
}
</style>
<body>
<p>Test to make sure that wrap-reverse flips the cross axis directions and items
with baseline alignment are aligned to cross axis start.</p>

<div class="flexbox">
  <div style="-webkit-flex: 1 0 100px;">first<br>first<br>first</div>
  <div style="-webkit-flex: 1 0 100px;">second</div>
  <div style="-webkit-flex: 1 0 100px; margin-top: 5px">third</div>
  <div style="-webkit-flex: 1 0 100px;">fourth<br>fourth</div>
</div>

<div class="flexbox">
  <div style="-webkit-flex: 1 0 100px;">first<br>first<br>first</div>
  <div style="-webkit-flex: 1 0 100px;">second</div>
  <div style="-webkit-flex: 1 0 100px;">third</div>
  <div style="-webkit-flex: 1 0 100px; margin-bottom: 5px">fourth<br>fourth</div>
</div>

<div class="flexbox" style="width: 300px;">
  <div style="-webkit-flex: 1 0 100px; -webkit-align-self: flex-start; height: 100px">first</div>
  <div style="-webkit-flex: 1 0 100px;">second</div>
  <div style="-webkit-flex: 1 0 100px;">third<br>third</div>
</div>

</body>
</html>
